#ifndef QHTMLRENDERER_H
#define QHTMLRENDERER_H

#include "htmlrenderer.h"
#include "textdialog.h"
#include <QtGui>

/****************************************************
  Html renderer implemented by Qt.
 ****************************************************/
class QHtmlRenderer : public HtmlRenderer
{
public:
    QHtmlRenderer();
    virtual ~QHtmlRenderer();

    virtual void render(HtmlText *);

    // Set the pixel map
    void setPixmap(QPixmap * pixmap){
        _pixmap = pixmap;
    }

    // Get the pixel map
    QPixmap * getPixmap(){
        return _pixmap;
    }

    // Simple render text using QPainter, must be called in paintEvent()
    void render(TextDialog *, QPainter *, int, int, int);

private:
    QPixmap * _pixmap;
};

#endif // QHTMLRENDERER_H
